﻿@{
    ViewBag.Title = "批量添加视图";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script type="text/javascript">
    var moduleId = request('moduleId');
    $(function () {
        initControl();
    })
    //保存表单
    function AcceptClick(callback) {
        try {
            var data = [];
            var JsonText = eval($("#JSONText").val());
            $.each(JsonText, function (i) {
                var row = JsonText[i];
                data.push({
                    F_EnCode: row.name,
                    F_FullName: row.label,
                    F_SortCode: i + 1,
                    F_ModuleId: moduleId,
                    F_ModuleColumnId: newGuid(),
                    F_ParentId: "0"
                })
            });
            callback(data);
            dialogClose();
        } catch (e) {
            alert(e)
        }
    }
</script>
<div style="margin-top: 10px; margin-right: 30px;">
    <table class="form">
        <tr>
            <th class="formTitle">JSON</th>
            <td class="formValue">
                <textarea id="JSONText" class="form-control" style="height: 190px;"></textarea>
            </td>
        </tr>
    </table>
</div>
